<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Enabling Debugging Features">
<meta name="DC.subject" content="Enabling Debugging Features, TBB_USE_DEBUG, TBB_USE_ASSERT, TBB_USE_THREADING_TOOLS, TBB_USE_PERFORMANCE_WARNINGS">
<meta name="keywords" content="Enabling Debugging Features, TBB_USE_DEBUG, TBB_USE_ASSERT, TBB_USE_THREADING_TOOLS, TBB_USE_PERFORMANCE_WARNINGS">
<meta name="DC.Relation" scheme="URI" content="../../reference/environment.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="enabling_debugging_features">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../intel_css_styles.css">
<title>Enabling Debugging Features</title>
<xml>
<MSHelp:Attr Name="DocSet" Value="Intel"></MSHelp:Attr>
<MSHelp:Attr Name="Locale" Value="kbEnglish"></MSHelp:Attr>
<MSHelp:Attr Name="TopicType" Value="kbReference"></MSHelp:Attr>
</xml>
</head>
<body id="enabling_debugging_features">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(2);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="enabling_debugging_features"><!-- --></a>

 
  <h1 class="topictitle1">Enabling Debugging Features</h1>
 
   
  <div> 
	 <div class="section"> 
		<p>Four macros control certain debugging features. In
		  general, it is useful to compile with these features on for development code,
		  and off for production code, because the features may decrease performance. The
		  table below summarizes the macros and their default values. A value of 1
		  enables the corresponding feature; a value of 0 disables the feature. 
		</p>
 
		
<div class="tablenoborder"><a name="tbl6"><!-- --></a><table cellpadding="4" summary="" id="tbl6" width="100%" frame="hsides" border="1" rules="all"><caption><span class="tablecap">Debugging Macros</span></caption> 
		   
		   
		   
		  <thead align="left"> 
			 <tr> 
				<th class="cellrowborder" valign="top" width="NaN%" id="d59878e61">
				  <p><strong>Macro</strong>
				  </p>

				</th>
 
				<th class="cellrowborder" valign="top" width="NaN%" id="d59878e69">
				  <p><strong>Default Value</strong>
				  </p>

				</th>
 
				<th class="row-nocellborder" valign="top" width="NaN%" id="d59878e77">
				  <p><strong>Feature</strong>
				  </p>

				</th>
 
			 </tr>
 
		  </thead>
 
		  <tbody> 
			 <tr> 
				<td class="cellrowborder" rowspan="2" valign="top" width="NaN%" headers="d59878e61 "> 
				  <p><samp class="codeph">TBB_USE_DEBUG</samp>
				  </p>

				</td>
 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e69 ">
				  <p>Windows* OS: 
				  </p>
 
				  <p>1 if 
					 <samp class="codeph">_DEBUG</samp> is defined, 
				  </p>
 
				  <p>0 otherwise.
				  </p>

				</td>
 
				<td class="row-nocellborder" rowspan="2" valign="top" width="NaN%" headers="d59878e77 "> 
				  <p>Default value for all other macros in this
					 table.
				  </p>

				</td>
 
			 </tr>

			 <tr> 
				<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e69 ">
				  <p>All other systems: 0.
				  </p>

				</td>
 
			 </tr>

			 <tr> 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e61 ">
				  <p><samp class="codeph">TBB_USE_ASSERT</samp>
				  </p>

				</td>
 
				<td class="cellrowborder" rowspan="3" valign="top" width="NaN%" headers="d59878e69 "> 
				  <p><samp class="codeph">TBB_USE_DEBUG</samp>
				  </p>
 
				  <p>&nbsp;
				  </p>

				</td>
 
				<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e77 ">
				  <p>Enable internal assertion checking. Can
					 significantly slow performance.
				  </p>

				</td>
 
			 </tr>

			 <tr> 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e61 ">
				  <p><samp class="codeph">TBB_USE_THREADING_TOOLS</samp>
				  </p>

				</td>
 
				<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e77 ">
				  <p>Enable full support for Intel&reg; Parallel
					 Studio XE and Intel&reg; Threading Tools.
				  </p>

				</td>
 
			 </tr>

			 <tr> 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e61 ">
				  <p><samp class="codeph">TBB_USE_PERFORMANCE_WARNINGS</samp>
				  </p>

				</td>
 
				<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e77 ">
				  <p>Enable warnings about performance issues.
				  </p>

				</td>
 
			 </tr>

		  </tbody>

		</table>
</div>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">TBB_USE_ASSERT</samp>
		  Macro</h2> 
		 
		<p>The macro 
		  <samp class="codeph">TBB_USE_ASSERT</samp> controls whether error checking is
		  enabled in the header files. Define 
		  <samp class="codeph">TBB_USE_ASSERT</samp> as 
		  <samp class="codeph">1</samp> to enable error checking.
		</p>
 
		<p>If an error is detected, the library prints an
		  error message on 
		  <samp class="codeph">stderr</samp> and calls the standard C routine 
		  <samp class="codeph">abort</samp>. To stop a program when internal error checking
		  detects a failure, place a breakpoint on 
		  <samp class="codeph">tbb::assertion_failure</samp>.
		</p>
 
		<div class="Note"><h3 class="NoteTipHead">
					Tip</h3>
		  <p>On Microsoft Windows* operating systems, debug
			 builds implicitly set 
			 <samp class="codeph">TBB_USE_ASSERT</samp> to 1 by default
		  </p>

		</div> 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">TBB_USE_THREADING_TOOLS</samp>
		  Macro</h2>
		 
		<p>The macro 
		  <samp class="codeph">TBB_USE_THREADING_TOOLS</samp> controls support for Intel&reg;
		  Threading Tools:
		</p>
 
		<ul type="disc"> 
		  <li>
			 <p>Intel&reg; Inspector XE
			 </p>

		  </li>
 
		  <li>
			 <p>Intel&reg; VTune&#8482; Amplifier XE
			 </p>

		  </li>

		  <li>
			 <p>Intel&reg; Parallel Inspector
			 </p>

		  </li>
 
		  <li>
			 <p>Intel&reg; Parallel Amplifier
			 </p>

		  </li>
 
		  <li>
			 <p>Intel&reg; Thread Profiler 
			 </p>

		  </li>
 
		  <li>
			 <p>Intel&reg; Thread Checker 
			 </p>

		  </li>
 
		</ul>
 
		<p>Define 
		  <samp class="codeph">TBB_USE_THREADING_TOOLS</samp> as 
		  <samp class="codeph">1</samp> to enable full support for these tools. 
		</p>
 
		<p>That is full support is enabled if error checking
		  is enabled. Leave 
		  <samp class="codeph">TBB_USE_THREADING_TOOLS</samp> undefined or zero to enable
		  top performance in release builds, at the expense of turning off some support
		  for tools.
		</p>

	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">TBB_USE_PERFORMANCE_WARNINGS</samp>
		  Macro</h2>
		 
		<p>The macro 
		  <samp class="codeph">TBB_USE_PERFORMANCE_WARNINGS</samp> controls performance
		  warnings. Define it to be 1 to enable the warnings. Currently, the warnings
		  affected are:
		</p>
 
		<ul type="disc"> 
		  <li>
			 <p>Some that report poor hash functions for 
				<samp class="codeph">concurrent_hash_map</samp>. Enabling the warnings may
				impact performance.
			 </p>

		  </li>
 
		  <li>
			 <p>Misaligned 8-byte atomic stores on Intel&reg; IA-32
				processors.
			 </p>

		  </li>
 
		</ul>
 
	 </div>
 
  </div>


<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../reference/environment.htm">Environment</a></div>
</div>
<div></div>

</body>
</html>
